CC=g++
CFLAGS=-Wall -std=c++11 -O3
PRG=programme

all : Graph.o GraphOriented.o GraphOrientedMatrix.o GraphNonOriented.o GraphWeighted.o GraphWeightedMatrix.o GraphOrientedWeighted.o GraphOrientedMatrix.o GraphOrientedWeightedMatrix.o GraphFlowMatrix.o GraphFlow.o GraphOrientedList.o GraphFlowList.o test.o main.o
	@echo Compilation complète
	$(CC) $(CFLAGS) Graph.o GraphOriented.o GraphOrientedMatrix.o GraphNonOriented.o GraphWeighted.o GraphWeightedMatrix.o GraphOrientedWeighted.o GraphOrientedWeightedMatrix.o GraphFlowMatrix.o GraphFlow.o GraphOrientedList.o GraphFlowList.o test.o -o $(PRG)
	$(CC) $(CFLAGS) Graph.o GraphOriented.o GraphOrientedMatrix.o GraphNonOriented.o GraphWeighted.o GraphWeightedMatrix.o GraphOrientedWeighted.o GraphOrientedWeightedMatrix.o GraphFlowMatrix.o GraphFlow.o GraphOrientedList.o GraphFlowList.o main.o -o benchmark

clean :
	rm -vf $(wildcard *.o)

clean_all : clean
	rm $(PRG) benchmark

test.o : test.cc graphtypes.h
	$(CC) $(CFLAGS) -c test.cc

main.o : main.cc graphtypes.h
	$(CC) $(CFLAGS) -c main.cc

Graph.o : Graph.cc Graph.h graphtypes.h
	$(CC) $(CFLAGS) -c Graph.cc

GraphOriented.o : GraphOriented.cc GraphOriented.h graphtypes.h
	$(CC) $(CFLAGS) -c GraphOriented.cc

GraphNonOriented.o : GraphNonOriented.cc GraphNonOriented.h graphtypes.h
	$(CC) $(CFLAGS) -c GraphNonOriented.cc

GraphFlow.o : GraphFlow.cc GraphFlow.h graphtypes.h
	$(CC) $(CFLAGS) -c GraphFlow.cc

GraphWeighted.o : GraphWeighted.cc GraphWeighted.h graphtypes.h
	$(CC) $(CFLAGS) -c GraphWeighted.cc

GraphOrientedWeighted.o : GraphOrientedWeighted.cc GraphOrientedWeighted.h graphtypes.h
	$(CC) $(CFLAGS) -c GraphOrientedWeighted.cc

GraphFlowWeighted.o : GraphFlowWeighted.cc GraphFlowWeighted.h graphtypes.h
	$(CC) $(CFLAGS) -c GraphFlowWeighted.cc

GraphOrientedList.o : GraphOrientedList.cc GraphOrientedList.h graphtypes.h
	$(CC) $(CFLAGS) -c GraphOrientedList.cc

GraphNonOrientedList.o : GraphNonOrientedList.cc GraphNonOrientedList.h graphtypes.h
	$(CC) $(CFLAGS) -c GraphNonOrientedList.cc

GraphFlowList.o : GraphFlowList.cc GraphFlowList.h graphtypes.h
	$(CC) $(CFLAGS) -c GraphFlowList.cc

GraphWeightedList.o : GraphWeightedList.cc GraphWeightedList.h graphtypes.h
	$(CC) $(CFLAGS) -c GraphWeightedList.cc

GraphOrientedWeightedList.o : GraphOrientedWeightedList.cc GraphOrientedWeightedList.h graphtypes.h
	$(CC) $(CFLAGS) -c GraphOrientedWeightedList.cc

GraphFlowWeightedList.o : GraphFlowWeightedList.cc GraphFlowWeightedList.h graphtypes.h
	$(CC) $(CFLAGS) -c GraphFlowWeightedList.cc

GraphOrientedMatrix.o : GraphOrientedMatrix.cc GraphOrientedMatrix.h graphtypes.h
	$(CC) $(CFLAGS) -c GraphOrientedMatrix.cc

GraphNonOrientedMatrix.o : GraphNonOrientedMatrix.cc GraphNonOrientedMatrix.h graphtypes.h
	$(CC) $(CFLAGS) -c GraphNonOrientedMatrix.cc

GraphFlowMatrix.o : GraphFlowMatrix.cc GraphFlowMatrix.h graphtypes.h
	$(CC) $(CFLAGS) -c GraphFlowMatrix.cc

GraphWeightedMatrix.o : GraphWeightedMatrix.cc GraphWeightedMatrix.h graphtypes.h
	$(CC) $(CFLAGS) -c GraphWeightedMatrix.cc

GraphOrientedWeightedMatrix.o : GraphOrientedWeightedMatrix.cc GraphOrientedWeightedMatrix.h graphtypes.h
	$(CC) $(CFLAGS) -c GraphOrientedWeightedMatrix.cc

GraphFlowWeightedMatrix.o : GraphFlowWeightedMatrix.cc GraphFlowWeightedMatrix.h graphtypes.h
	$(CC) $(CFLAGS) -c GraphFlowWeightedMatrix.cc

